package com.csun.dsms.service.impl;

import com.csun.dsms.comment.core.support.BaseService;
import com.csun.dsms.mapper.HgUserMapper;
import com.csun.dsms.mapper.IhgUserMapper;
import com.csun.dsms.model.huang.HgQueryDto;
import com.csun.dsms.model.huang.HgUser;
import com.csun.dsms.model.huang.IHgQueryDto;
import com.csun.dsms.model.huang.IhgUser;
import com.csun.dsms.service.HgUserService;
import com.csun.dsms.service.IHgUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class IHgUserServiceImpl extends BaseService<IhgUser> implements IHgUserService {

    @Resource
    private IhgUserMapper ihgUserMapper;


    @Override
    public Integer addHgUser(IhgUser hgUser) {
        return ihgUserMapper.insert(hgUser);
    }

    @Override
    public List<IhgUser> queryList(IHgQueryDto iHgQueryDto) {
        return ihgUserMapper.queryListWithPage(iHgQueryDto);
    }

    @Override
    public Integer editUser(IhgUser hgUser) {
        return ihgUserMapper.updateByPrimaryKey(hgUser);
    }

    @Override
    public IhgUser selectByPhone(String phone) {
        return ihgUserMapper.selectIhgUserByPhone(phone);
    }
}
